<%@ Page Language="VB" %>

<script runat="server">

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
        
        Dim user As MembershipUser = Membership.GetUser
        If Roles.IsUserInRole(user.UserName, "Boogaloo Admin") Then
            Session("mc_isLoggedIn") = "true"
            Session("mc_user") = user.UserName
            Session("mc_groups") = ""
            Response.Redirect(Request("return_url"), True)
        Else
            litErrorMessage.Text = "You do not have permission to work with files."
            Response.End()
        End If
        
    End Sub

</script>

<html>
    <head>
    <title>Authentication Error</title>
    </head>
    <body>
    <form runat="server" id="mcfilemanager">
    
    <asp:literal id="litErrorMessage" runat="server" />
    
    </form>
    
    </body>
</html>